package com.wyw.mahjong.server.processor;

import com.wyw.mahjong.common.msg.HelloRequest;
import com.wyw.mahjong.common.msg.HelloResponse;
import com.wyw.mahjong.common.util.MessageUtils;
import lombok.extern.slf4j.Slf4j;

/**
 * @Title   测试连通性的处理器
 * @Description
 * @Author Mr Wu yewen.wu.china@gmail.com
 * @Date 2024/5/6 18:16
 * Update History:
 * Author        Time            Content
 */
@Slf4j
public class HelloRequestProcessor implements MahjongProcessor<HelloRequest> {

    @Override
    public void process(HelloRequest message) {
        log.info("receive hello request: {}", message);
        HelloResponse response = new HelloResponse();
        response.setMessage("你好，" + message.getName());
        MessageUtils.sendResponse(response);
    }
}
